package com.acme.task4;

public class Task4Arrays {
	public static void main(String[] args) {

		int [] array = {3,7,9,7,3,7,7,3,7,3};
		
		int count3 = 0;
		int count7 = 0;
		int count9 = 0;
		
		for (int element : array){
			switch(element)
			{
				case 3:
					count3++;
					break;
				case 7:
					count7++;
					break;
				case 9:
					count9++;
					break;
				default:
					System.out.println("element "+ element +" is not 3 7 or 9. \nexit.");
					return;
			}
		}
			
		System.out.println("Number of 3: " + count3);
		System.out.println("Number of 7: " + count7);
		System.out.println("Number of 9: " + count9);
	}
}
